<?php
/*
	Copyright 2006, 2007, 2008, 2009, 2010 Bastiaan Grutters
    
    This file is part of Ages of Strife website.

    Ages of Strife website is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Ages of Strife website is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Ages of Strife website.  If not, see <http://www.gnu.org/licenses/>.
 */
ob_start( 'ob_gzhandler()' );
session_start();
header( 'Content-type: text/html; charset=utf-8' );
global $language;
$language = 'en';
include_once( "global/old_database_connection.php" );
include( "global/translations.php" );
$query5 = "SELECT language, title " .
		"FROM languages " .
		"ORDER BY title";
$result5 = mysql_query( $query5 ) or die( "Query failed : " . mysql_error() );
$num5 = mysql_numrows( $result5 );
if( isset( $_GET[ 'language' ] ) ) {
	$i = 0;
	while ( $i < $num5 ) {
		if( $_GET[ 'language' ] == mysql_result( $result5, $i, 'language' ) ) {
			$language = mysql_result( $result5, $i, 'language' );
			break;
		}
		$i ++;
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<title>Ages of Strife: <?php transprint( 'Game rules and support' ); ?></title>
		<link type="text/css" rel="stylesheet" href="global/agesofstrife.css"></link>
	</head>
	<body>
		<div id="root_container">
			<div align="center" id="header-image">
				<a href="index.php?language=<?php print( $language ); ?>">
					<img class="header-dummy-image" src="resources/dummy.gif" alt="Ages of Strife" border="0" />
				</a>
			</div>
<?php
include( "global/ads.php" );
?>
			<div id="container">
				<div id="main-content">
					<h2>
						Ages of Strife: <?php transprint( 'Game rules and support' ); ?>
					</h2>
					<br />
<?php 
	include( 'global/game_rules.php' );
?>
					<br />
					<div class="blok">
						<?php transprint( 'Click' ); ?> <a href="index.php?language=<?php print( $language ); ?>"><?php transprint( 'here' ); ?></a> <?php transprint( 'to go back to the main page.' ); ?><br />
						<br />
						<?php
							if( isset( $_SESSION[ 'password_recover_status' ] ) ) {
								print "Status: " . $_SESSION[ 'password_recover_status' ] . "<br/><br />\r\n";
								unset( $_SESSION[ 'password_recover_status' ] );
							}
						?>
						<form method="post" action="global/password_lost.php">
							<table id="twothird">
								<tr><th colspan="2"><?php transprint( 'Recover username and reset password' ); ?></th></tr>
								<tr><td><?php transprint( 'E-mail address' ); ?>:</td><td><input name="recover_address" size="40" /></td></tr>
								<tr><td>&nbsp;</td><td><input type="submit" value="submit" /></td></tr>
							</table>
						</form>
						<br />
						<strong><?php transprint( 'Requirements' ); ?></strong><br />
						<?php transprint( 'Ages of Strife requires JavaScript and cookies.' ); ?><br />
						<?php transprint( 'Ages of Strife is tested on Mozilla Firefox 3.0, Firefox 3.5, Microsoft Internet Explorer 6.0 and Microsoft Internet Explorer 7.0.' ); ?><br />
						(<?php transprint( 'Other browsers might work but are untested' ); ?>)<br />
						<?php transprint( 'Note: Even though Internet Explorer 6 is supported the game looks better in a more recent browser, if possible it is highly recommended to upgrade.' ); ?><br />
					</div>
				</div>
			</div>
		</div>
	</body>
</html>